from selenium.webdriver.common.by import By

from base.basepage import PageBase
from common.UiSelector import UiSelector

class MainPage(PageBase):
    DRAFT_SELECT_ID = 'ivSelect'
    DRAFT_MANAGER_ID = 'managerDraft'
    DELETE_DRAFT_ID = 'deleteDraft'

    def select_draft(self, number):
        self.click((By.ID, self.DRAFT_MANAGER_ID))
        self.loop_click((By.ID, self.DRAFT_SELECT_ID), number)

    def delete_draft(self, number):
        self.select_draft(number)
        self.click((By.ID, self.DRAFT_SELECT_ID))
        self.click((By.ID, self.DELETE_DRAFT_ID))
        self.click_text("直接删除")




